﻿using System;

namespace Everis.Recruiting.Support.Extensions
{
    public static class DateTimeExtensions
    {
        public static string ToString(this DateTime? dateTime, string format)        
        {            
            return dateTime.ToString(format, "");        
        }        
        
        public static string ToString(this DateTime? dateTime, string format, string returnIfNull)
        {
            return dateTime.HasValue ? ((DateTime)dateTime).ToString(format) : returnIfNull;
        }
    }
}
